package com.gtja.beoms.base;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author Ghao
 * @date 2021/11/12
 * 调用kafka生产者的url
 */
@Component
public class KafkaUrlConstans {

    private static String kafkaUrl;


    @Value("${kafka_url}")
    public void setKafkaUrl(String kafkaUrl) {
        KafkaUrlConstans.kafkaUrl = kafkaUrl;
    }

    /** 生产会话存档整合消息到kafka */
    public String PRODUCT_TIME_NODE_URL;

    @PostConstruct
    public void init() {
        PRODUCT_TIME_NODE_URL = kafkaUrl + "/writeNode2Wechat";
    }


}
